#include<bits/stdc++.h>
#define ll long long
using namespace std;
int n,r[111111];
int lv;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    for(int i=0;i<n;i++)cin>>r[i];
    sort(r,r+n);
    for(int i=1;i<n;i++){
        if(r[i]>r[lv])lv++;
    }
    cout<<n-lv<<endl;
    return 0;
}
